From: Florian Müllner Date: Fri, 14 Feb 2020 19:19:37 +0000 (+0100) Subject: unlock: Don't show prompt on shifty key presses X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~777^2^2~21 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8834088f3b43c935cb725adf9674da8ebb31ddbf;p=gnome-shell.git unlock: Don't show prompt on shifty key presses Shift, caps-lock and friends change the capitalization of following key presses. It is unexpected for those keys to have side-effects, so don't switch to the prompt when they are pressed. https://gitlab.gnome.org/GNOME/gnome-shell/issues/2215 --- diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index 7a6c93612..70968ad4d 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -593,6 +593,13 @@ var UnlockDialog = GObject.registerClass({ (this._promptBox && this._promptBox.visible)) return Clutter.EVENT_PROPAGATE; + const { keyval } = keyEvent; + if (keyval === Clutter.KEY_Shift_L || + keyval === Clutter.KEY_Shift_R || + keyval === Clutter.KEY_Shift_Lock || + keyval === Clutter.KEY_Caps_Lock) + return Clutter.EVENT_PROPAGATE; + let unichar = keyEvent.unicode_value; this._showPrompt();